package com.hnevc.androidui6;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class ActivityExample extends AppCompatActivity {
    private TextView tv_name;
    private TextView tv_password;



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_example);

        Intent intent = getIntent();//获取 意图
        //用户名 参数 获取
        String name = intent.getStringExtra("name");
        //密码 参数 获取
        String pwd = intent.getStringExtra("password");
        tv_name = (TextView) findViewById(R.id.tv_name);
        tv_password = (TextView) findViewById(R.id.tv_password);
        tv_name.setText("用户名："+name);
        tv_password.setText("密   码："+pwd);
    }
}
